export function getJson(key) {
  return JSON.parse(localStorage.getItem(key)) || {};
}
export function setJson(key, value) {
  localStorage.setItem(key, JSON.stringify(value));
}
export function contains(key) {
  let value = localStorage.getItem(key);
  if (!value) {
    return false;
  } else if (JSON.stringify(value) === '{}') {
    return false;
  }
  return true;
}
export function clear(key) {
  localStorage.removeItem(key);
}